// land类
const landDom = document.querySelector('.land')
const landStyles = getComputedStyle(landDom)
const landWidth = parseFloat(landStyles.width)
const landHeight = parseFloat(landStyles.height)
const landTop = parseFloat(skyHeight - landHeight)

// 继承自父类
class Land extends RectTangle {
    constructor() {
        super(landWidth, landHeight, 0, (skyHeight - landHeight), -100, 0, landDom)
    }

    // land自己的方法
    onMove() {
        if(this.left <= -landWidth / 2) {
            this.left = 0
        }
    }
}

// var land = new Land

// setInterval(() => {
//     land.move(16 / 1000)
// }, 16)